package cn.wolfcode.controller;

import cn.wolfcode.annotion.PermissionAnnotation;
import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.EmployeeQueryObject;
import cn.wolfcode.result.JsonResult;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/employee")
public class EmployeeController {
    @RequestMapping("/query")
    public Object query(EmployeeQueryObject qo){
        return new JsonResult();
    }
    @RequestMapping("/saveOrUpDate")
    @PermissionAnnotation(name="员工添加或修改",expression = "employee:saveOrUpDate")
    public Object saveOrUpDate(Employee employee){
        return new JsonResult();
    }
    @PermissionAnnotation(name="员工删除",expression = "employee:delete")
    @RequestMapping("/delete")
    public Object delete(Long id){
        return new JsonResult();
    }
}
